#pragma once

#include "CAnimation.h"
#include "CAnimationInfo.h"
#include <iostream>
#include <windows.h>
#include <string>
using std::string;
#include <map>
using std::map;

class CAnimationEngine
{
private:
	map<string, CAnimation*> m_mAnimations;
	string m_szRelativePathImage;
	string m_szRelativePathData;

	static CAnimationEngine* m_nInstance;

	CAnimationEngine(void);
	~CAnimationEngine(void);
	CAnimationEngine(CAnimationEngine& AnimationEngine);
	CAnimationEngine& operator=(CAnimationEngine& AnimationEngine);
public:
	void Init(string szFilepath);
	void Update(CAnimationInfo& Info, float fElapsedTime);
	void Render(string szTag, int CurFrame, int PosX, int PosY, float scalex, float scaley);

	void RemoveAllAnimations();
	void Shutdown();
	static CAnimationEngine* GetInstance();
};
